import { createSlice } from '@reduxjs/toolkit'
import dayjs from 'dayjs'
const CitySlice = createSlice({
  name: 'CitySlice',
  initialState:{
    start:"北京",
    end:"广州",
    date:dayjs().format("YYYY-MM-DD")
  },
  reducers: {
    editTime(state,{payload}){
        state.date=payload.date
    }
  },
})

// Action creators are generated for each case reducer function
export const { editTime } = CitySlice.actions

export default CitySlice.reducer